package com.wtwd.device.service;


import com.wtwd.device.model.entity.Device;
import com.wtwd.device.model.entity.UpgradeVo;
import com.wtwd.device.model.vo.RespEntity;

/**
 * @author ljiong
 * @date 2021/08/11
 * @description
 */
public interface AppDeviceService {
    RespEntity userBindDevice(Long userId, String macAddress, String name, String uuId);

    RespEntity<Device> getUserDeviceList(Integer currentPage, Integer pageSize, Long userId);

    RespEntity unbindDevice(Long userId, String macAddress);

    RespEntity unbindDeviceAndClearUserInfo(Long userId, String macAddress);

    RespEntity<Device> getWatchByMacAddress(String macAddress);

    RespEntity<UpgradeVo> checkForUpdate(String watchId, String currentFirmware, String language, String macAddress);

    RespEntity updateDevice(Integer id,String targetFirmware, String macAddress);

    RespEntity activeDevice(String macAddress, String watchId,Long activeTime, Integer activation,String lng,String lat,String area);

    boolean clearSportDataByDate(String date);

    Device getDeviceByUserId(long userId);

    /**
     * 暂时从数据库拿，有时间切换缓存
     *
     * @param imei
     * @return
     */
    Long getDeviceIdByImei(String imei);

    /**
     * 根据设备imei号获取设备信息
     *
     * @param deviceKey
     * @return
     */
    Device getDeviceInfoByImei(String deviceKey);
}
